<?
	Class Driver extends DB {
		static function GetTableCols($arguments) {
			$table = $arguments[0];
			$fetchpdo=isset($arguments[1])?$arguments[1]:\PDO::FETCH_CLASS;
			return DB::G('Model')->query("PRAGMA table_info($table)")->fetchAll($fetchpdo);
		}

		static function GetFK($arguments) {
			$table = $arguments[0];
			$fetchpdo=isset($arguments[1])?$arguments[1]:\PDO::FETCH_CLASS;
			return DB::G('Model')->query("PRAGMA foreign_key_list($table)")->fetchAll($fetchpdo);
		}

		static function GetTable($arguments) {
			$name = $arguments[0];
			$fetchpdo=isset($arguments[1])?$arguments[1]:\PDO::FETCH_CLASS;
			return DB::G('Model')->query("SELECT * FROM sqlite_master WHERE type='table' AND name='".$name."'")
				->fetchAll($fetchpdo);
		}
	}
?>
